﻿
using System.ServiceModel.DomainServices.Client;

namespace WebSilverlight.Web
{
    public partial class InvoiceListProvider
    {
    #region Properties
		InvoiceDomainContext _dc;
        public InvoiceDomainContext DomainContext
        {
            set
            {
                _dc = value;
                if (_dc.InvoiceWrappers.Count == 0)
                {
                    _dc.Load<InvoiceWrapper>(_dc.GetInvoiceQuery());
                }
            }
        }
        public EntitySet<InvoiceWrapper> EntityList
        {
            get
            {
                return _dc.InvoiceWrappers;
            }
        }        
	#endregion
		public InvoiceListProvider()
        {
            DomainContext = new InvoiceDomainContext();
        }
    }
}
